package org.iteam.core.utils;

import java.util.UUID;

/**
 * uuid工具类
 * 
 * @author Tony
 * 
 */
public class UUIDUtil {
	private static final UUIDUtil instance = new UUIDUtil();

	public static UUIDUtil getInstance() {
		return instance;
	}

	/**
	 * 获得uuid
	 * 
	 * @return
	 */
	public String getUUID() {
		return getUUID("_");
	}

	/**
	 * 获得uuid
	 * 
	 * @param separator
	 *            分隔符
	 * @return
	 */
	public String getUUID(String separator) {
		return UUID.randomUUID().toString().replaceAll("-", separator)
				.toUpperCase();
	}
}
